<?php

namespace app\admin\model;

class SpecsModel extends CommonModel
{
    protected $autoWriteTimestamp = true;//自动写入时间戳
    protected $pk = 'id';//主键，可以用get查询

    //关联属性表
    public function attrMany(){
        return $this->hasMany('attrModel','specs_id','id')->field('id,specs_id,attr_name');
    }
}
